package com.wuwei.business.controller;

import com.wuwei.business.Dto.CheckDto;
import com.wuwei.business.domain.BusCheck;
import com.wuwei.business.service.BusCheckService;
import com.wuwei.common.core.controller.BaseController;
import com.wuwei.common.core.domain.model.LoginUser;
import com.wuwei.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 内容: SSM
 * 作者: weishao
 */
@RestController
@RequestMapping("business/check")
public class CheckController extends BaseController {

    @Autowired
    private BusCheckService busCheckService;

    @GetMapping("list")
    public TableDataInfo list(CheckDto checkDto){
        startPage();
        LoginUser loginUser = getLoginUser();
        List<BusCheck> busChecks = busCheckService.selectCheckPage(loginUser, checkDto);
        return getDataTable(busChecks);
    }
}
